package com.ylz.sjzx.sio.common.mid.mq;

import lombok.Getter;

import java.util.Map;

/**
 * @author wiqi
 * @version 1.0
 * @date 2020/12/24
 */
@Getter
public enum QueueEnum {
    /**
     * 测试队列
     */
    QUEUE_CHAT_DIRECT_TEST(QueueConst.QUEUE + QueueConst.IM_CHAT_DIRECT_TEST, QueueConst.KEY + QueueConst.IM_CHAT_DIRECT_TEST, true, false, false, true, null, null,
            ExchangeEnum.Exchange_IM_CHAT_DIRECT_TEST);
    /**
     * /**
     * 队列参数
     */
    Map<String, Object> arguments;
    /**
     * /**
     * 匹配消息头
     */
    Map<String, Object> heads;
    /**
     * 队列唯一名称 规范：queue_服务编码.模块编码.功能编码
     */
    private String name;
    /**
     * (d)key_服务编码.模块编码.功能编码
     */
    private String routingKey;
    /**
     * 是否为持久队列
     */
    private boolean durable;
    /**
     * 是否为排他队列
     */
    private boolean exclusive;
    /**
     * 队列为空是否删除
     */
    private boolean autoDelete;
    /**
     * 是否全匹配
     */
    private boolean whereAll;
    private ExchangeEnum exchangeEnum;

    QueueEnum(String name, String routingKey, boolean durable, boolean exclusive, boolean autoDelete,
              boolean whereAll, Map<String, Object> arguments, Map<String, Object> heads,
              ExchangeEnum exchangeEnum) {
        this.name = name;
        this.routingKey = routingKey;
        this.durable = durable;
        this.exclusive = exclusive;
        this.autoDelete = autoDelete;
        this.whereAll = whereAll;
        this.arguments = arguments;
        this.heads = heads;
        this.exchangeEnum = exchangeEnum;
    }
}
